/* Includes ------------------------------------------------------------------*/
#include "steper.h"

/* USER CODE BEGIN 0 */
/* USER CODE END 0 */

steper Steper1;

int16_t steperControl(int32_t current ,int32_t expect, int16_t speed)
{
	int16_t temp = current-expect;
	
	if(temp>0)
		PDout(15)=0;//反转
	else
		PDout(15)=1;//正转
	if (__fabs(temp)<10)
		PHout(2)=0;
	return temp;
}

	/**************正转*******************/

  /**************反转*******************/
	
  
  /**************加速*******************/

  
  /**************减速******************/

  		
  /**************到位*******************/


/* USER CODE BEGIN 1 */

/* USER CODE END 1 */

